package www.reagnetbox.com.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import www.reagnetbox.com.R;
import www.reagnetbox.com.bean.IdName;
import www.reagnetbox.com.bean.RecentStockInListItem;

public class RecentStockInListAdapter extends BaseQuickAdapter<RecentStockInListItem, BaseViewHolder> {
    private BaseViewHolder viewHolder;
    private Context context;

    public RecentStockInListAdapter(Context context, int resContentView, List<RecentStockInListItem> data) {
        super(resContentView, data);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder viewHolder, RecentStockInListItem item) {
        this.viewHolder = viewHolder;
        viewHolder
                .setText(R.id.tv_no, item.getNo()+"")
                .setText(R.id.tv_code, item.getCode())
                .setText(R.id.tv_name, item.getName())
                .setText(R.id.tv_model, item.getModel())
                .setText(R.id.tv_num, item.getNum()+"")
                .setText(R.id.tv_time, item.getStockInTime());

    }
}

